package com.zygh.interactiveplatform.module.entity;


import lombok.Getter;
import org.hyperic.sigar.*;

@Getter
public class SysStatusData {

    // cpu信息
    private CpuInfo info;
    private CpuPerc perc;
    private Cpu timer;
    private CpuPerc[] cpuPercList ;

    // 内存信息
    private Mem mem ;

    public SysStatusData() throws SigarException {
        Sigar sigar = new Sigar();
        this.info = sigar.getCpuInfoList()[0];
        this.perc = sigar.getCpuPerc();
        this.cpuPercList = sigar.getCpuPercList();
        this.timer = sigar.getCpu();
        this.mem = sigar.getMem() ;
    }

}
